import request from '@/utils/request'

// 查询规格列表列表
export function listSpecification(query) {
  return request({
    url: '/shangpin/specification/list',
    method: 'get',
    params: query
  })
}

// 查询规格列表详细
export function getSpecification(id) {
  return request({
    url: '/shangpin/specification/' + id,
    method: 'get'
  })
}

// 新增规格列表
export function addSpecification(data) {
  return request({
    url: '/shangpin/specification',
    method: 'post',
    data: data
  })
}

// 修改规格列表
export function updateSpecification(data) {
  return request({
    url: '/shangpin/specification',
    method: 'put',
    data: data
  })
}

// 删除规格列表
export function delSpecification(id) {
  return request({
    url: '/shangpin/specification/' + id,
    method: 'delete'
  })
}

// 获取规格值列表
export function getSpecificationValues() {
  return request({
    url: '/shangpin/specification/values',
    method: 'get'
  })
}



